const express = require("express")

const app = express()

app.use(require('cors')())
app.use(express.json())

app.set('secret','23qg344gwe%2j3fn][')

app.use('/',express.static(__dirname+'/web'))
app.use('/uploads',express.static(__dirname+'/uploads'))
app.use('/admin/',express.static(__dirname+'/admin'))

require('./routes/admin')(app)
require('./routes/web')(app)
require('./plugins/db.js')(app)

app.listen(3000,()=>{
    console.log("http://localhost:3000")
})